package com.easybuy.dao;

import com.easybuy.Tools.Page;
import com.easybuy.pojo.Category;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {
    //查询三层分类
    List<Category> selectSanCeng();
    Category selectById(@Param("id") int id);
    Category selectByName(@Param("name") String name);
    List<Category> selectByParentId(@Param("id") int id);
    int allCount();
    List<Category> allCategorys(Page page);
    int addCategory(Category category);
    int deleCategory(@Param("id") int id);
    int updateCategory(Category category);
    List<Category> getCategoryBytype(int type);

}
